<!DOCTYPE html>
<html style="height: 100%" lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="utf-8">
<title>ECharts</title>
<!-- 引入jquery -->
<script type="text/javascript"
	th:src="@{/ajax/libs/jquery/3.5.0/dist/jquery.min.js}"></script>
<!-- 引入 echarts.js -->
<script type="text/javascript"
	th:src="@{/ajax/libs/echarts/5.0.1/dist/echarts.min.js}"></script>
</head>

<body style="height: 100%; margin: 0">
	<div id="container" style="height: 100%"></div>


	<script type="text/javascript">
		var chartDom = document.getElementById('container');
		var myChart = echarts.init(chartDom);
		var option;

		option = {
			xAxis : {
				type : 'category',
				data : [ 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun' ]
			},
			yAxis : {
				type : 'value'
			},
			series : [ {
				data : [ 120, 200, 150, 80, 70, 110, 130 ],
				type : 'bar'
			} ]
		};

		option && myChart.setOption(option);

	</script>
</body>
</html>